﻿<?php
try
{
	//$pdo = new PDO("mysql:host=mysql.kukew.info;dbname=u425924758_bjyxl", "u425924758_bjyxl", "123123");
	$pdo = new PDO("mysql:host=127.0.0.1;dbname=bjyxlshuju", "root", "bjyxl!@#QYGLadmin51909199");
	$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	$cmd= json_decode($GLOBALS["HTTP_RAW_POST_DATA"]);
	if($cmd!=null)
	{
		$statement = $pdo->prepare($cmd->SqlTxt);
		$retStr="";
		foreach($cmd->SqlParas as $SqlPara)
		{
			$statement->bindParam($SqlPara->Key,$SqlPara->Value);
			$retStr=$retStr." ".$SqlPara->Value;
		}
		$statement->execute();
		echo "Success";
	}
}
catch(Exception $e)
{
	echo "Failed: " . $e->getMessage();
}

?>

